#include "ExamineWidget.h"
#include "ui_ExamineWidget.h"
#include <QPainter>
#include <QButtonGroup>
#include <QStyleOption>

ExamineWidget::ExamineWidget(QWidget *parent)
	: QWidget(parent)
{
	ui = new Ui::ExamineWidget();
	ui->setupUi(this);
	setProperty("mPane",true);
	
	ui->eTipLabel->adjustSize();
	ui->eTipLabel->setAlignment(Qt::AlignTop);

	QButtonGroup* buttonGroup = new QButtonGroup(this);
	buttonGroup->setExclusive(true);
	buttonGroup->addButton(ui->eQuickBtn1);
	buttonGroup->addButton(ui->eQuickBtn2);
	buttonGroup->addButton(ui->eQuickBtn3);
	buttonGroup->addButton(ui->eQuickBtn4);

	ui->eQuickBtn1->setProperty("eQuickBtn", true);
	ui->eQuickBtn2->setProperty("eQuickBtn", true);
	ui->eQuickBtn3->setProperty("eQuickBtn", true);
	ui->eQuickBtn4->setProperty("eQuickBtn", true);
}

ExamineWidget::~ExamineWidget()
{
	delete ui;
}

void ExamineWidget::paintEvent(QPaintEvent* event) 
{
	QStyleOption opt;
	opt.init(this);
	QPainter p(this);
	style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
}
